<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>睿立南方教育管理平台</title>
<link href="/ipodium-res/styles/web.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="/ipodium-res/styles/custom.css" />
<script type="text/javascript" src="/ipodium-res/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="/ipodium-res/js/jquery-ui.min.js"></script>
<link href="/ipodium-res/styles/jqueryui.css" media="screen" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="Rightframe">
<div class="title">首页 > 视频管理 >  添加/编辑</div>
<div class="addtt">添加新视频</div>
<div class="stt"><span>视频标题：</span>
<input type="text" id="" name="" value="请输入视频标题" onFocus="if(value==defaultValue){value='';this.style.color='#05469A'}" onBlur="if(!value){value=defaultValue;this.style.color='#999'}" style="color:#999999" class="put1" /><p>*视频标题不能超过50个字符，必须以中文开头</p>
</div>
<div class="leftlist">
<dl>视频简介：</dl><ol><textarea name="" cols="" rows="" class="nops"></textarea></ol>
<dl>视频类型：</dl><ol>学习交流 - 学习园地</ol>
<dl>学科：</dl><ol>
    <input type="checkbox" name="checkbox" id="checkbox" />
  语文     
  <input type="checkbox" name="checkbox2" id="checkbox2" />
  外语     
  <input type="checkbox" name="checkbox3" id="checkbox3" />
  数学     
  <input type="checkbox" name="checkbox4" id="checkbox4" />
  历史     
  <input type="checkbox" name="checkbox5" id="checkbox5" />
  地理     
  <input type="checkbox" name="checkbox6" id="checkbox6" />
  全部
</ol>
<dl>推荐范围：</dl><ol><input name="" type="radio" value="" />班级     
  <input name="" type="radio" value="" />
  年级     
  <input name="" type="radio" value="" />
  校内     
  <input name="" type="radio" value="" />
  全部
</ol>
<dl>适用年龄：</dl><ol>
  <input name="" type="radio" value="" />
  3岁以下     
  <input name="" type="radio" value="" />
  3~6岁     
  <input name="" type="radio" value="" />
  6~12岁     
  <input name="" type="radio" value="" />
  12~18岁     
  <input name="" type="radio" value="" />
  所有
</ol>
<dl>视频标签：</dl>
<ol><input type="text" id="" name="" value="请输入视频标签" onFocus="if(value==defaultValue){value='';this.style.color='#05469A'}" onBlur="if(!value){value=defaultValue;this.style.color='#999'}" style="color:#999999" class="put2" /><br />
<span>*视频标签请用英文状态下的空格分隔</span></ol>
<dl>视频缩略图：</dl><ol><input type="text" id="" name="" value="C:\" onFocus="if(value==defaultValue){value='';this.style.color='#05469A'}" onBlur="if(!value){value=defaultValue;this.style.color='#999'}" style="color:#999999" class="put1" />
<input name="btn" type="submit" class="addbtn" id="btn" value="预览" />
<br />
<span>*如不上传视频缩略图，则默认显示系统默认图片，图片尺寸为4：3，请上传高清图<br />
片，最大支持2M</span>
</ol>
<dl>视频文件：</dl><ol><input type="text" id="" name="" value="C:\" onFocus="if(value==defaultValue){value='';this.style.color='#05469A'}" onBlur="if(!value){value=defaultValue;this.style.color='#999'}" style="color:#999999" class="put1" />
<input name="btn" type="submit" class="addbtn" id="btn" value="预览" />
<br />
<span>*最大支持20M，支持格式为MP4,AVI</span>
</ol>
</div>
<div class="preview">
<div class="previewtu"></div>
<div class="previewzi">
图片大小：125KB<br />
图片名称：1255483.jpg
</div>
</div>
<div class="preview">
<div class="previewtu"></div>
<div class="previewzi">
视频大小：125KB<br />
视频名称：1255483.jpg
</div>
</div>
<div class="bottom">
<input name="btn" type="submit" class="tijiao" id="btn" value="上传" />
<input name="btn" type="submit" class="cancel" id="btn" value="返回" /></div>
</div>
<!--  -->
<div  id="dialog-form" class="ui-dialog-content ui-widget-content" scrolltop="0" scrollleft="0">
<select style="height: 90%; width:150px" size="12" name="movie_type" id="movie_type">
<s:iterator id="vt" value="videoTypes" status="st">
<option <s:if test="#vt.sepId==selectedTypeDsid">selected="selected"</s:if>  value="<s:property value="#vt.sepId"/>"><s:property value="#vt.name" /></option>
</s:iterator>
</select>
  <div style="padding: 15px 10px; display:inline-block;padding-top: 80px;" class="clearfix" id="selector">
    <ul>
      <li>&gt;&gt;</li>
      <li>&gt;&gt;</li>
    </ul>
  </div>
           <select style="height: 90%; width:150px" size="12" name="movie_type_cat" id="movie_type_cat">
           <s:iterator id="rlt" value="rltVideoCats" status="stRlt">
           <option value="<s:property value="#rlt.uid"/>" <s:if test="#stRlt.index==0">selected="selected"</s:if>><s:property value="#rlt.name"/></option>
           </s:iterator>
        	</select>
</div>

<s:if test="selectedCatUid==null || selectedCatUid.length==0">
<script type="text/javascript">
        $(function(){
            $(".grade>ul>li").bind("click", function(){

            });
            $( "#dialog-form" ).dialog({
                title:"选择视频类型",
                autoOpen: 'true' != "",
                height: 380,
                width: 380,
                modal: true,
                buttons: {
                    "确定": function() {
                        $( this ).dialog( "close" );
                        var url="/ipodium/addVideo.action?selectedTypeDsid=";
                        url+=$("#movie_type").val();
                        url+="&selectedCatUid="+$("#movie_type_cat").val();
                       window.location.href=url;
                    },
                    "关闭": function() {
                        //window.location.href="videoCenter.action"
                        //  $( this ).dialog( "close" );
                    	$(this).dialog("close");
                    }
                },
                close: function() {
                	//$(this).dialog("close");
                     window.location.href="videoCenter.action";
                    //  allFields.val( "" ).removeClass( "ui-state-error" );
                }
            });

            $("#movie_type").click(function(){

                $.get('/ipodium/loadRltVideoCat.action',
                        {selectedTypeDsid: $("#movie_type").val()},
                        function(rsp){
                            $("#movie_type_cat").html(rsp);
                        }
                );
            });
        })
    </script>
</s:if>
</body>
</html>
